<!--
 * @Author: your name
 * @Date: 2022-02-22 15:23:58
 * @LastEditTime: 2022-02-22 15:27:46
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \briup-study\day02\6-清除浮动.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>清楚浮动</title>
    <style>
        .parent{
            border: 10px solid red;
            overflow: hidden;
        }
        .child{
            width: 100px;
            height: 100px;
            background-color: blue;
            /* 使用float属性脱离文档流 */
            float: left;
        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="child">

        </div>
    </div>
</body>
</html>